import React from 'react';
import imgSearch from "@/assets/images/imgSearch.png"
import imgQR from "@/assets/images/imgQR.png"
import "./SearchInput.css"
import { useHistory } from 'react-router-dom';

const SearchInput = (props) => {
    const navigator=useHistory()
    const toSearch=()=>{
        // console.log('---');
        navigator.push('/search')
    }
    return (
        <div className="search" >
            {/* 搜索框 */}
            <div className="search-input" onClick={()=>toSearch()}>
                {/* <div className="search-context"> */}
                    <div className='search-icon'>
                        <img className='search-img' src={imgSearch} ></img>
                    </div>
                    <input className='input' type="text" placeholder='在千万海外商品中搜索'  />
                {/* </div> */}
            </div>
            {/* 扫一扫 */}
            <div className="search-code">
            <img className="QR-code" src={imgQR}></img>
            </div>
        </div>
    )
}
export default SearchInput